package doctor

import (
	"context"
	"srv/config"
	"srv/internal/model/dao"
	__ "srv/proto"
)

// 实现方法
func (s *DoctorService) UserHao(ctx context.Context, req *__.UserHaoRequest) (resp *__.UserHaoResponse, err error) {
	hao := dao.Hao{
		Name:        req.Name,
		Hospital:    req.Hospital,
		HospitalAdd: req.HospitalAdd,
		Doctor:      req.Doctor,
		Level:       req.Level,
		Status:      req.Status,
	}
	config.DB.Create(&hao)
	return &__.UserHaoResponse{Id: int64(hao.ID)}, nil
}
